module Page3.View exposing (..)
import Page3.Model as P3
import Html as H
import Html.Attributes as A

type Msg =
  No

view : P3.Page -> H.Html Msg
view model =
  H.div
    [A.id "page3"
    ,A.class "page"
    ,A.class "slide"
    ]
    [H.h4 [] [H.text (.title model)]
    ,H.h5 [] [H.text (.sub_title model)]
    ,H.ul [] (List.map (item_div >> list >> (H.li [])) (.items model))]

list: a -> List a
list x =
  [x]

item_div : P3.Item -> H.Html Msg
item_div item =
  H.div
    []
    [ H.div [] [H.text (.title item)]
    , H.div [] [H.text (.content item)]]